<template>
  <!-- 页眉 -->
  <header class="main-header">
    <!-- Logo -->
    <a class="logo">
      <span class="logo-mini">
        <img src="../../assets/img/logo1.jpg" alt="logo图片加载失败"/>
      </span>
      <span class="logo-lg">
        <img src="../../assets/img/logo1.jpg" alt="logo图片加载失败"/>
        <b>桥梁数据中心</b>
      </span>
    </a>
    <!--  导航栏  -->
    <NavBar
      @changePassword="changePassword"
      @logout="logout">
    </NavBar>
  </header>
</template>
<script>

  import NavBar from "./NavBar.vue"
  import {doGet} from "../../assets/js/utils/RequestUtils"
  import {HOME} from "../../assets/js/global"
  import {LOGOUT,SET_AUTHORIZED_MENU, SET_AUTHORIZED_MENU_FUNCTION, CLEAR_CURRENT_MENUS, CLEAR_CACHED_TABS, SET_ACTIVE_TAB} from "../../store/mutationTypes"

  export default {
    name: "AppHeader",
    methods:{
      changePassword() {
        this.$emit("changePassword")
      },
      logout() {
        //退出登录，同时清空所有的授权数据
        this.$store.commit(LOGOUT);
        window.location.reload();
      }
    },
    components: {NavBar}
  }
</script>

<style scoped>
  .logo img {
    width: 40px;
    margin:auto 5px;
  }
</style>



// WEBPACK FOOTER //
// AppHeader.vue?5b6aa1e2
